<?php
/**
 * ExceptionCode.php
 * @copyright (c) 2011-2020, Hangzhou DOJI Tech Co., Ltd.
 * This is NOT a freeware, use is subject to license terms.
 * @package ExceptionCode.php
 * @link https://www.tingjunapp.com/
 * @author wujun@lanqb.cn
 * @: ExceptionCode.php 310000 2020-11-11 22:59:25 $
 * */

namespace App\Consts;

class ExceptionCode
{

    // 公用
    const CODE_FAIL = 500;
    const ILLEGAL_PARAMETER = 999;
    const INSUFFICIENT_PERMISSIONS = 401;
    const OPERATING_SUCCESS = 200;
    const SAVE_FAIL = 998;
    const NOT_FOUND_TARGET = 997;
    // 微信第三方登录使用的错误码
    const APPLET_OK = 0;
    const APPLET_IllegalAesKey = 41001;
    const APPLET_IllegalIv = 41002;
    const APPLET_IllegalBuffer = 41003;
    const APPLET_DecodeBase64Error = 41004;

    // 后台 - 登录
    const ADMIN_USERNAME_ERROR = 1001;
    const ADMIN_PASSWORD_ERROR = 1002;
    const ADMIN_NOT_EXISTS = 1003;
    const ADMIN_ONLY_LOGIN = 1004;

    // 前台 - 用户
    const USER_NOT_EXIST_OR_ABNORMAL = 2001;
    const WRONG_PASSWORD = 2002;
    const ABNORMAL = 2003;
    const NICKNAME_ALREADY_EXISTS = 2004;
    const INVALID_TEL = 2005;
    const TEL_HAVE_USER = 2006;
    const CACHE_USER_ERROR = 2007;
    const INVALID_CODE = 2008;
    const MAX_TRY_COUNT = 2009;
    const NOT_AUTHOR = 2010;
    const MAX_CATEGORY_COUNT = 2011;
    const HAVE_OTHER_BIND = 2012;
    const NOT_HAVE_THIRD_BIND = 2013;
    const NOT_HAVE_OTHER_BIND = 2014;
    const DO_NOT_REPEAT_SEND = 2015;
    const NOT_BIND_PHONE = 2016;
    const TEL_ERROR = 2017;
    const NOT_HAVE_PASSWORD = 2018;
    const LOGIN_FAIL = 2019;
    const REPEAT_BIND_TEL = 2020;
    const BIND_FAIL = 2021;
    const WECHAT_ALREADY_BIND = 2022;
    const TEL_CODE_FALT = 2023; //验证码错误
    const LOGIN_CODE_TIME_INTERVAL = 2024;
    const NOT_BIND_TEL = 2025;
    const PC_UNBIND = 2026;
    public const TOKEN_FAIL = 2027;

    // 分类
    const HAVE_AUTHOR = 3001;
    const FIRST_CATEGORY_HAVE_ALL = 3002;
    const NAME_CATEGORY_ALREADY_USE = 3003;

    // 专题
    const CANNOT_DELETED_OR_RETURN = 4001;

    // 点赞
    const REPEAT_LIKE = 5001;
    const REPEAT_CANCEL_LIKE = 5002;

    // 收藏
    const REPEAT_COLLECT = 6001;
    const REPEAT_CANCEL_COLLECT = 6002;

    // 动态
    const REPEAT_FORWARD = 7001;
    const REPEAT_CANCEL_FORWARD = 7002;

    // 文本过滤
    const HAVE_SENSITIVE_CONTENT = 87014;

    // 删除状态
    const DEL_NORMAL = 8000;
    const DEL_DELETED = 8001;

    // 关注
    const REPEAT_ATTENTION = 9001;
    const REPEAT_CANCEL_ATTENTION = 9002;
    const DO_NOT_ATTENTION_SELF = 9003;
    const DO_NOT_ATTENTION_FANS_SELF = 9004;

    // 广告
    const HAVE_MAX_AD = 10001;

    // 文章
    const IS_NOT_BELONG_TO_AUTHOR = 11001;
    const MAX_TAG = 11002;
    const GRAB_FAILURE = 11003;//网络不稳定，抓取失败了！(一键推荐文章抓取)
    const ARTICLE_TITLE_CHECK = 11004;//草稿变投稿 文章标题不能为空，请重新编辑草稿！
    const ARTICLE_CONTENT_CHECK = 11005;//草稿变投稿 文章内容不能为空，请重新编辑草稿！
    const ARTICLE_COVER_URL_CHECK = 11006;//草稿变投稿 文章封面图不能为空，请重新编辑草稿！
    const ARTICLE_ERROR = 11007;//文章不存在
    const ARTICLE_UNPASS_OR_SHIELD = 11008; // 文章被退回或屏蔽
    public const NOT_ARTICLE_AUTHOR = 11009;
    public const DRAFT_NOT_CREATE_NOTE = 11010; //草稿不能做笔记

    // 标签
    const REPEAT_LIKE_TAG = 12001;
    const REPEAT_CANCEL_TAG = 12002;
    const TAG_CATEGORY_EXIST = 12003;
    const TAG_EXIST = 12004;
    const TAG_CATEGORY_NOT_FOUNT = 12005;
    const  TAG_NAME_NOT_VALID = 12006; //标签名不合法

    // 分享
    const LINK_URLILLEAGL = 13001;

    // 作者
    const MAX_TAG_COUNT = 14001;
    const ALREADY_AUTHOR = 14002; //已经是作者
    const ONLY_HAVE_ONE_EMPTY_DRAFE = 14003; //
    const HAVE_NOT_LINK_RECOMMEND_ARTICLE_AUTH = 14004;
    const AUTHOR_NOT_EXIST = 14005; //该作者不存在

    // 收藏夹
    public const FAVORITE_FAIL = 17001;

    //小程序错误码 20000开始
    const NOT_REAL_USER = 20000; //真实用户不存在(用户未绑定手机号)
    const SUBMITTED_FOR_ENTRY = 20001; //已经提交入驻申请,请勿重复提交
    const BUNDLED_MOBILE = 20002; //您已绑定手机号，请勿重复绑定

    // 一键推荐
    const RECOMMEND_PARTTIME_NOT_RIGHT = 16001;

}
